<template>
  <div class="app-container book-content">
    <iframe :src="'../../../static/pdf/web/viewer.html?file='+src" frameborder="0" width="100%" height="100%"></iframe>
  </div>
</template>

<script>
export default {
  data() {
    return {
      src:''
    }
  },
  components: {},
  mounted() {
    console.log(this.$route.query.url)
    this.src = this.$route.query.url
  },
  methods: {
  }
};
</script>
<style lang="less" scoped>
.book-content {
  height: 600px;
  .content {
    width: 966px;
    height: 642px;
    background: #f8f3e9;
    margin: 66px auto;
    border-radius: 10px;
    position: relative;
    box-shadow: #e6e6e6 2px 6px 2px;
    .fade {
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0px;
      left: 0px;
      background: rgba(0, 0, 0, 0.7);
      cursor: pointer;
    }
    .menu-list {
      height: 100%;
      width: 0;
      background: #fff;
      position: absolute;
      right: 0px;
      top: 0px;
      transition: all 0.3s;
      overflow: hidden;
      .list-content {
        position: relative;
        width: 483px;
        height: 100%;
        .list-area {
          overflow-y: scroll;
          height: calc(100% - 85px);
          ul {
            padding: 20px 10px;
            li {
              border-bottom: 1px solid #c1c1c1;
              padding: 15px 0px;
              color: #80807c;
              display: flex;
              justify-content: space-between;
            }
            li:last-child {
              border-bottom: none;
            }
          }
        }
        .list-area::-webkit-scrollbar {
          display: none;
        }
      }
      .title {
        margin: 35px auto 20px auto;
        width: 294px;
        height: 45px;
        line-height: 45px;
        text-align: center;
        display: block;
        background-color: #f2ebe5;
        border-radius: 5px;
        color: #80807c;
        font-size: 18px;
      }
      .close {
        position: absolute;
        top: 20px;
        right: 26px;
        cursor: pointer;
        user-select: none;
      }
    }
    .menu-list.active {
      width: 483px;
    }
    #area {
      padding: 20px 50px;
    }
    .page {
      width: 78px;
      height: 302px;
      background: #f8f3e9;
      position: absolute;
      border-radius: 10px;
      right: -98px;
      bottom: 20px;
      .prev,
      .next {
        display: block;
        height: 150px;
        position: relative;
        cursor: pointer;
      }
      .next {
        border-bottom: 1px solid #e8e3da;
      }
      .prev:after {
        content: "";
        position: absolute;
        left: calc(50% - 5px);
        top: calc(50% - 10px);
        display: inline-block;
        width: 20px;
        height: 20px;
        border-top: 2px solid #000;
        border-right: 2px solid #000;
        transform: rotate(-135deg);
      }
      .next:after {
        content: "";
        position: absolute;
        left: calc(50% - 15px);
        top: calc(50% - 10px);
        display: inline-block;
        width: 20px;
        height: 20px;
        border-top: 2px solid #000;
        border-right: 2px solid #000;
        transform: rotate(45deg);
      }
    }
    .menu {
      height: 155px;
      width: 78px;
      background: #f8f3e9;
      position: absolute;
      border-radius: 10px;
      right: -98px;
      top: 145px;
      span {
        display: block;
        height: 67px;
        text-align: center;
        border-bottom: 1px solid #e8e3da;
        cursor: pointer;
        padding-top: 10px;
        .iconfont {
          display: block;
          background: url("/static/images/book/menu.png") no-repeat;
          width: 30px;
          height: 30px;
          margin: 0 auto;
          background-position: -30px 0;
        }
      }
      span:nth-child(2) {
        .iconfont {
          background-position: -60px 0;
        }
      }
      span:last-child {
        border-bottom: none;
      }
    }
    .history {
      width: 60px;
      height: 60px;
      text-align: center;
      border-radius: 10px 0 0 10px;
      position: absolute;
      background: #15c798;
      cursor: pointer;
      img {
        width: 30px;
        height: 30px;
        display: block;
        margin: 5px auto 0 auto;
      }
      div {
        // flex: 1;
        color: #fff;
        font-size: 14px;
        display: block;
        position: relative;
      }
    }
    .history {
      left: -60px;
      top: 20px;
    }
  }
}
</style>


